package com.api.gbhg.heyulei.dao.impl;

import com.api.gbhg.heyulei.dao.AccountingStatusDao;
import weaver.conn.RecordSet;

/**
 * 修改报销会计审核状态dao
 * @author hyl
 * @version 1.0
 * @date 2021/5/8 15:57
 */
public class AccountingStatusDaoImpl implements AccountingStatusDao {

    /**
     * 修改报销会计审核状态
     * @param tableName 表名
     * @param requestId requestId
     */
    @Override
    public boolean updateAccountingStatus(String tableName, String requestId,String status) {
        boolean flag = false;
        try {
            RecordSet rs = new RecordSet();
            String sql = "UPDATE " + tableName + "  SET bxhjshzt = "+ status +" WHERE requestid = " + requestId;
            flag = rs.executeUpdate(sql);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }
}
